<html>
 <head>
	<title>[var.TITLE]</title>
	<link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
	<link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">	
	<script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>	
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
		<tr>
			<td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
		</tr>

		<tr>
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
				</tr>
				<tr>
					<td style="background-color=whitesmoke" >
					<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>
      			  			<script language="JavaScript" type="text/JavaScript">menu.Build();</script>
						  	</td>
						  <td class="head-login">Login as [var.USERPROFILE_NAME]</td>
						</tr>
					  </table>
					</td>
				</tr>
				<tr>
					<td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
				</tr>
			</table>
			</td>
		</tr>
		<tr height="100%">
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
				<tr valign="top">
					<td width="100%">
						<table border="0" cellspacing="0" cellpadding="0" width="100%">
							<tr>
								<td class="head-path"></td>
								<td class="corner-date">[var.CORNER_DATE]</td>
							</tr>
						</table>
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="FacetHeaderContent" align="left">.:[var.SubHeaderTitle]:. </td>
							</tr>
						</table>
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="contentTitle">Menu</td>
							</tr>
							<tr>
								<td class="content2">
								<table cellspacing="2" cellpadding="0">
								 <tr>
								   <td>
								    <input type="button" name="Action" value="Done" class="button" onClick="self.location.replace('[var.SERVER_URL]')">
								   </td>
								   <td align="right">
								    <input type="button" name="Action" value="Print To PDF" class="button" onClick="SubmitForm()">
								   </td>								   
								 </tr>
								</table>
								</td>
							</tr>
							<tr>
								<td class="content2">
									<table border="0" cellspacing="0" cellpadding="0">
									<form name='[var.HTMLGridList]'>
										<tr>
											<td class="fieldCaption" align="right">Source</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="source" class="input" onchange="SwitchBankKas(this.value)">
				                      			  <option value="Bank">Bank</option>
				                      			  <option value="Cash">Cash</option>
												</select>											
											</td>
										</tr>
										
										<tr>
											<td class="fieldCaption" align="right">1=Non Decimal; 2=Decimal</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="forexRate" size="5" maxlength="50" class="inputNumber" value="1">
											</td>
										</tr>
										
										
										<tr>
											<td class="fieldCaption" align="right">From Date</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="fromDate" size="10" maxlength="50" class="input" value="">
							    			<script>oDateMask = new Mask('dd/mm/yyyy','date');oDateMask.attach(document.[var.HTMLGridList].fromDate)</script>
												<a href="javascript:void(0)" onclick="gfPop.fPopCalendar([var.HTMLGridList].fromDate);return false;" hidefocus>
												<img name="popcal" align="absMiddle" src="[var.ROOT_DIR]js/Calendar/pop/calbtn.gif" width="34" height="22" border="0" alt=""></a>
							    			
											</td>
										</tr>
										<tr>
											<td class="fieldCaption" align="right">To Date</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="toDate" size="10" maxlength="50" class="input" value="">
											<script>oDateMask = new Mask('dd/mm/yyyy','date');oDateMask.attach(document.[var.HTMLGridList].toDate)</script>
												<a href="javascript:void(0)" onclick="gfPop.fPopCalendar([var.HTMLGridList].toDate);return false;" hidefocus>
												<img name="popcal" align="absMiddle" src="[var.ROOT_DIR]js/Calendar/pop/calbtn.gif" width="34" height="22" border="0" alt=""></a>
											</td>
										</tr>
										<tr>
											<td class="fieldCaption" align="right">Office</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="office" class="input">
												  <option value="">-</option>
				                      			  <option value="[officeformblk.ktrasl]">[officeformblk.ktrasl]-[officeformblk.ktrnam;block=option]</option>
												</select>
											</td>
										</tr>
                                                                                
										<tr id='idkas' >
											<td class="fieldCaption" align="right">Skada</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="skadakas" class="input">
												<option value="">-</option>
                                                                                                                        <option value="[skadakasblk.skada]">[skadakasblk.skada]-[skadakasblk.namacc;block=option]</option>
												</select>											
											</td>
										</tr>
                                                                                
										<tr id='idbank' >
											<td class="fieldCaption" align="right">Skada</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="skadabank" class="input">
												<option value="">-</option>
                                                                                                                        <option value="[skadabankblk.skada]">[skadabankblk.skada]-[skadabankblk.namacc;block=option]</option>
												</select>											
											</td>
										</tr>

										<tr>
											<td class="menuHeader"></td>
											<td class="menuHeader"></td>
											<td class="menuHeader"></td>
										</tr>
									</form>
									</table>
								</td>
							</tr>
							<tr>
								<td>
								</td>
							</tr>
							<tr>
								<td >&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>

			</td>
		</tr>
		<tr>
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<td class="footer1"><img src="images/spacer.gif" height="1" width="1"></td>
				</tr>
				<!--tr>
					<td class="footer2">Prototype Test - Web Application</td>
				</tr-->
			</table>
			</td>
		</tr>		
 	</table>
 </body>
</html>
 <iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="[var.ROOT_DIR]js/Calendar/pop/ipopeng.htm" scrolling="no" frameborder="0" style="LEFT: -500px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 999"></iframe>
<script>
document.getElementById("idkas").style.display = 'none';
function SwitchBankKas(source) {
   if (source=='Bank') {
     document.getElementById("idkas").style.display = 'none';
     document.getElementById("idbank").style.display = '';
   } else {   
      document.getElementById("idbank").style.display = 'none';
      document.getElementById("idkas").style.display = '';
   }   
}

function SubmitForm() {
  parameterize  = 'source='+document.[var.HTMLGridList].source.value;
  parameterize += '&fromDate='+document.[var.HTMLGridList].fromDate.value;
  parameterize += '&toDate='+document.[var.HTMLGridList].toDate.value;
  parameterize += '&forexRate='+document.[var.HTMLGridList].forexRate.value;
  if (document.[var.HTMLGridList].source.value=='Bank')
    parameterize += '&skada='+document.[var.HTMLGridList].skadabank.value;
  else 
    parameterize += '&skada='+document.[var.HTMLGridList].skadakas.value;
    
    parameterize += '&office='+document.[var.HTMLGridList].office.value;
    
    if (CheckRequire()) OpenPDF('[sys.script_name]?PageMode=PDF&'+parameterize);

}

function CheckRequire() {
	fromdate = document.[var.HTMLGridList].fromDate.value;
	todate   = document.[var.HTMLGridList].toDate.value;
        if (document.[var.HTMLGridList].source.value=='Bank')
	skada   = document.[var.HTMLGridList].skadabank.value;
        else 
        skada   = document.[var.HTMLGridList].skadakas.value;
	source   = document.[var.HTMLGridList].source.value;

	if ((fromdate.length>0) && (todate.length>0) && (skada.length>0) && (source.length>0)) return true;
	else return false;
}

</script>